package hk.hku.hooku.pojo;

import java.util.ArrayList;

public class EventVote {
	private String voterEmail;
	private String voterName;
	private String note;
	private ArrayList<EventChoice> eventChoices;
	
	public EventVote() {
		super();
		this.eventChoices=new ArrayList<EventChoice>();
	}

	public EventVote(String voterEmail, String voterName, String note) {
		super();
		this.voterEmail = voterEmail;
		this.voterName = voterName;
		this.note = note;
		this.eventChoices=new ArrayList<EventChoice>();
	}

	public EventVote(String voterEmail, String voterName, String note,
			ArrayList<EventChoice> eventChoices) {
		super();
		this.voterEmail = voterEmail;
		this.voterName = voterName;
		this.note = note;
		this.eventChoices = eventChoices;
	}
	
	public String getVoterEmail() {
		return voterEmail;
	}
	public String getVoterName() {
		return voterName;
	}
	public String getNote() {
		return note;
	}
	public ArrayList<EventChoice> getEventChoices() {
		return eventChoices;
	}
	public void setVoterEmail(String voterEmail) {
		this.voterEmail = voterEmail;
	}
	public void setVoterName(String voterName) {
		this.voterName = voterName;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public void setEventChoices(ArrayList<EventChoice> eventChoices) {
		this.eventChoices = eventChoices;
	}
	
	@Override
	public boolean equals(Object o){
		if(o instanceof EventVote){
			EventVote vote=(EventVote)o;
			return this.getVoterEmail().equals(vote.getVoterEmail());
		}
		return false;
	}

}
